﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zielonka.co.uk.extensions.system
{
    // Description: cAppends a formatted string and the default line terminator to to this StringBuilder instance
    /*
        StringBuilder builder = new StringBuilder();
        builder.AppendLineFormat("File name: {0} (line: {1}, column: {2})", fileName, lineNumber, column);
        builder.AppendLineFormat("Message: {0}", exception.Message);
     */

    public static partial class StringBuilderExtensions
    {
        public static StringBuilder AppendLineFormat(this StringBuilder builder, string format, params object[] arguments)
        {
            string value = String.Format(format, arguments);

            builder.AppendLine(value);

            return builder;
        }
    }
}
